package com.clouddot.baipai.contract;


import com.clouddot.baipai.http.entity.response.applyLeaveResponse;
import com.clouddot.baipai.http.entity.response.getLeaveRecordResponse;
import com.clouddot.baipai.http.entity.response.getLeaveTypeResponse;
import com.clouddot.baipai.http.entity.response.getPersonInfoResponse;

import org.wxy.sdk.base.IBaseModel;
import org.wxy.sdk.base.IBasePresenter;
import org.wxy.sdk.base.IBaseView;

import rx.Observable;

/**
 * Created by wxy on 2018/05/27.
 *
 * @author wxy
 */
public interface IPersonFragmentContract {

    interface IPresenter extends IBasePresenter {
        void getPersonInfo();

        void applyLeave(String LeaveType, String LeaveTypeText, String LeaveStart, String LeaveEnd, String LeaveReason);

        void getLeaveRecord(int pageindex, int pagesize);

        void getLeaveType(String id);

        void pushLeaveNo(String cardID, String LeaveTypeText, String LeaveStart, String LeaveEnd, String LeaveReason);

    }

    interface IModel extends IBaseModel {
        Observable<getPersonInfoResponse> getPersonInfo(String acttype);

        Observable<applyLeaveResponse> applyLeave(String acttype, String LeaveType, String LeaveTypeText, String LeaveStart, String LeaveEnd, String LeaveReason);

        Observable<getLeaveTypeResponse> getLeaveType(String acttype, String id);

        Observable<getLeaveRecordResponse> getLeaveRecord(String acttype, int pageindex, int pagesize);

        Observable<String> pushLeaveNo(String cardID, String LeaveTypeText, String LeaveStart, String LeaveEnd, String LeaveReason);
    }

    interface IView extends IBaseView {
        void success(int flag, Object object);

        void fail(int flag, String errMsg);
    }
}
